/**
 * jims
 */
package com.jims.master.modules.patient.myFamily.dao;

import com.jims.master.common.persistence.CrudDao;
import com.jims.master.common.persistence.annotation.MyBatisDao;
import com.jims.master.modules.patient.myFamily.entity.MyFamily;
import org.apache.ibatis.annotations.Param;

import java.util.List;


/**
 * DAO接口
 * @author jicunteng
 * @version 2017-07-21
 */
@MyBatisDao
public interface MyFamilyDao extends CrudDao<MyFamily> {
    /**
     * 根据id查找用户所有的家人信息
     * @param id
     * @return
     */
    public List<MyFamily> findFamilyById(MyFamily myFamily);

    /**
     * 通过id修改电话
     * @param mobilePhone
     * @param id
     * @return
     */
    public int updatePhoneById(@Param("mobilePhone")String mobilePhone,@Param("id")String id);

    /**
     * 通过电话查找家人信息
     * @param mobilePhone
     * @return
     */
    public MyFamily findByMobliePhone(@Param("mobilePhone")String mobilePhone);

    /**
     * 添加身份证照片
     * @param headPath
     * @return
     */
    public int insertPic (@Param("headPath")String headPath);

    /**
     * 通过身份证查找家人信息
     * @param idCard
     * @return
     */
    public MyFamily getMyFamilyByIdCard(@Param("idCard")String idCard);
    /**
     * 判断亲属关系是否存在
     * @param myFamily
     * @return
     */
    public int judgeRelationship(MyFamily myFamily);
}